Jade = require 'koa-jade'
path = require 'path'

config = require './config'

moment = require 'moment'
moment.locale('zh-cn')

jadeLocals = {
    moment: moment
}

jadePath = config.serverJadePath || path.join(__dirname, 'jade')

console.log jadePath
jade = new Jade({
    viewPath: jadePath
    locals: jadeLocals,
    noCache: process.env.product != '1'
})

exports.jade = jade